package com.sy.controller.admin;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sy.dto.CourseUserPageQueryDTO;
import com.sy.pojo.Course;
import com.sy.result.PageResult;
import com.sy.result.Result;
import com.sy.service.CourseUserService;
import com.sy.vo.CourseUserVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api("课程用户管理相关接口")
@Slf4j
@RestController
@RequestMapping("/admin/courseUserController")
public class CourseUserController {
    @Autowired
    private CourseUserService courseUserService;
    //课程查询
    @GetMapping("/findAll")
    @ApiOperation("报名课程")
    public Result<PageResult> findAll( CourseUserPageQueryDTO courseUserPageQueryDTO){
        log.info("报名课程分页查询",courseUserPageQueryDTO);
        PageResult pageResult=courseUserService.findAll(courseUserPageQueryDTO);
        return Result.success(pageResult);
    }


}
